This invention relates to a time synchronization system including a time master and a time slave, and more particularly, to a time synchronization system in which a time slave corrects time managed by the time slave itself based on a time packet transmitted from a time master.
Application fields of information and telecommunication networks are expanding with the increase in the area and speed of information and telecommunication networks. Hitherto, systems that utilize a geographically limited information and telecommunication network have been built. Today, large-scale systems utilizing a wide area information and telecommunication network which is not geographically limited are being explored. A known example of such systems is energy management systems such as a smart grid system.
Large-scale systems that utilize a wide area information and telecommunication network demand enhanced reliability from the network. A technology for enhancing network reliability that is being explored involves accurately synchronizing time that is managed by a time slave with time that is managed by a time master by transmitting a time packet from the time master through the network.
For instance, IEEE 1588 v2 is a technology for synchronizing time on the order of microseconds. FIG. 19 is an explanatory diagram of the basic principle of IEEE 1588 v2. A time synchronization system in IEEE 1588 v2 includes a time master for transmitting a time packet and a time slave, which is coupled to the time master via a network, for receiving the time packet. The network through which the time packet is communicated is constructed of a switch that has a transparent clock function. The transparent clock function is a function of relaying a packet after including in the packet the length of time required to transmit the packet within the switch.
FIG. 20 is a sequence diagram illustrating a communication sequence according to the basic time synchronization algorithm of IEEE 1588. The time master and the time slave hold two-way communication to synchronize the time of the time slave with the time of the time master.
The time master periodically transmits a Sync message to the time slave. The time master records a time T1 at which the Sync message has been transmitted (hereinafter referred to as “Sync transmission time”). The time master next transmits a Follow_up message to the time slave. When transmitting the Follow_up message, the time master stores the Sync transmission time T1 in the Follow_up message.
The time slave receives the Sync message and, with processing of receiving this as a trigger, records a time T2 at which the Sync message has been received (hereinafter referred to as “Sync reception time”). The time slave next receives the Follow_up message, and extracts and records the Sync transmission time T1 stored in the Follow_up message. The time slave then transmits a Delay_Request message to the time master. The time slave records a time T3 at which the Delay_Request message has been transmitted (hereinafter referred to as “Delay transmission time”).
The time master receives the Delay_Request message and, with processing of receiving this as a trigger, records a time T4 at which the Delay_Request message has been received (hereinafter referred to as Delay reception time”). The time master next transmits a Delay_Response message to the time slave. When transmitting the Delay_Response message, the time master stores the Delay reception time T4 in the Delay_Response message.
The time slave receives the Delay_Response message, and extracts and records the Delay reception time T4 stored in the Delay_Response message. Based on the Sync transmission time T1 and the Sync reception time T2, the time slave calculates a differential MS_Diff between time at the time master (hereinafter referred to as “master time”) and time at the time slave (hereinafter referred to as “slave time”) by the following Expression 1.MS_Diff=T2−T1  Expression 1
The time slave also obtains a differential between the slave time and the master time based on the Delay transmission time T3 and the Delay reception time T4 by the following Expression 2.SM_Diff=T4−T3  Expression 2
A delay in one way between the time master and the time slave (Delay) is obtained next with the use of MS_Diff and SM_Diff and the following Expression 3.Delay=(MS_Diff+SM_Diff)/2  Expression 3
The slave time is modified next by obtaining a time offset of the time slave with respect to the time master (Offset) by the following Expression 4.Offset=MS_Diff−Delay=((T2−T1)−(T4−T3))/2  Expression 4
The premise of the calculation method described above is that the network transmission delay time is constant.
On the other hand, when there are fluctuations in transmission delay between the time master and the time slave and fluctuations in queuing delay which occurs in a relay node in the network, a more accurate network transmission delay time needs to be measured in order to obtain a higher synchronization precision. This is why a switch used to build a time synchronization network has a transparent clock function as illustrated in FIG. 21. FIG. 21 is a sequence diagram illustrating a communication sequence according to a time synchronization algorithm of a system that includes a switch with a transparent clock function that conforms to IEEE 1588 v2. The switch with the transparent clock function transfers time packets after including the lengths of delays caused in the switch, namely, a delay time T5−T4, a delay time T7−T6, a delay time T9−T8, and a delay time T11−T10, in the time packets. This enables the time slave to take into account the length of delay caused in the switch when correcting time.
To build a time synchronization network as this, all switches used to build the network need to have a transparent clock function. Most switches already disposed in a network, on the other hand, do not have a transparent clock function. Replacing the switches or adding a function to the switches is therefore required, which increases the cost and labor of building a time synchronization network. A method aimed to solve this problem is known which involves having a communication node measure its own delay amount by a simple method and correcting time (see JP 2011-135482 A, for example).
In another known method for enhancing the precision of time synchronization, a time slave measures network jitters so that switches used to build a time synchronization network do not need to have special means and, when the measured jitters are outside a jitter tolerance range which is set in advance, does not correct time (see JP 2009-077207 A, for example).
JP 2009-077207 A also discloses that, when statistical processing of network jitters measured by the time slave reveals a significant variation in jitters, switching of networks path used for time synchronization is detected.